package com.hsgene.pay.controller;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.pay.service.GeneticPaymentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * 获取支付信息
 *
 * @author wangbing
 * @version 1.0, 2018/10/9
 */
@RestController
@RequestMapping("/v1.0/genetic/testing/payment")
public class GeneticPaymentController {

    @Resource
    private GeneticPaymentService geneticPaymentService;

    @GetMapping("{paymentId}")
    public ApiResult getPayment(
            @PathVariable("paymentId") String paymentId,
            HttpServletResponse response) {
        return geneticPaymentService.getPayment(paymentId, response);
    }
}
